<?php

namespace App\Http\Requests\Logic\Demand;

use Illuminate\Foundation\Http\FormRequest;

class StoreResource extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
        	'project_id' => 'required',
			'demands' => 'required|array'
        ];
    }

	/**
	 * Date: 25/04/2018
	 * @author George
	 * @return array
	 */
	public function messages()
	{
		return [
			'project_id.required' => '请选择项目',
			'demands.required' => '请选择项目人员需求',
		];
    }
}
